package com.onec.service.channel.service.channel.base;

import com.onec.service.api.dto.request.channel.ChannelTradeReq;
import com.onec.service.api.dto.response.channel.ChannelTradeResp;
import com.onec.service.channel.entity.ChannelOrderDetail;
import org.springframework.beans.factory.InitializingBean;

import javax.servlet.http.HttpServletRequest;
import java.math.RoundingMode;

/**
 * 订单通道方法设计
 *
 * @author ONEC
 */
public interface BaseChannelOrderService extends InitializingBean {

    /**
     * 通道小数保留进位方式
     *
     * @return
     */
    RoundingMode getRoundingMode();

    /**
     * 微信交易通用类
     */
    ChannelTradeResp requestWeiXin(ChannelOrderDetail channelOrderDetail);

    /**
     * 支付宝交易通用类
     */
    ChannelTradeResp requestAliPay(ChannelTradeReq channelTradeReq);

    /**
     * 银联二维码交易通用类
     */
    ChannelTradeResp requestUnionPay(ChannelTradeReq channelTradeReq);

    /**
     * 快捷支付开通银行卡
     */
    ChannelTradeResp requestOpen(ChannelTradeReq channelTradeReq);

    /**
     * 快捷支付短信验证码通用类
     */
    ChannelTradeResp requestApiSms(ChannelTradeReq channelTradeReq);

    /**
     * 快捷支付交易通用类
     *
     * @param
     * @return
     */
    ChannelTradeResp requestApi(ChannelTradeReq channelTradeReq);


    /**
     * 签约申请
     *
     * @return
     */
    ChannelTradeResp signUpCard(ChannelTradeReq channelTradeReq);


    /**
     * 解约
     *
     * @return
     */
    ChannelTradeResp unSignUpCard(ChannelTradeReq channelTradeReq);

    /**
     * 出款
     *
     * @return
     */
    ChannelTradeResp repayment(ChannelTradeReq channelTradeReq);


    /**
     * 快捷支付交易通用类
     *
     * @param
     * @return
     */
    ChannelTradeResp requestHtml(ChannelOrderDetail channelOrderDetail);

    /**
     * 绑卡异步通知
     */
    ChannelTradeResp notifyOpenCardApi(HttpServletRequest request);

    /**
     * 交易异步通知
     */
    ChannelTradeResp notifyOnlineOrderApi(HttpServletRequest request);

    /**
     * 商户结算异步通知
     */
    ChannelTradeResp notifySettleApi(HttpServletRequest request);


    /**
     * 商户绑卡信息查询
     */
    ChannelTradeResp querySignUpCard(ChannelTradeReq channelTradeReq);

    /**
     * 订单信息查询
     */
    ChannelTradeResp queryOnlineOrderApi(ChannelOrderDetail orderDetail);

    /**
     * 代付交易订单车讯
     *
     * @return
     */
    ChannelTradeResp queryRepayment(ChannelTradeReq channelTradeReq);


}
